//
//  ZDOrder.h
//  TCProject
//
//  Created by admin on 16/1/20.
//  Copyright © 2016年 wise-wing. All rights reserved.
//

#import <BM4Group/BM4Group.h>
#import "ZDTruck.h"
/**
 订单状态
 */
typedef enum : NSUInteger {
    ZDOrderStatusRush = 0,   //抢单中
    ZDOrderStatusWait,       //待开始(抢单人数满)
    ZDOrderStatusDoing,      //进行中(预约时间到)
    ZDOrderStatusEnded,      //已完成
    ZDOrderStatusCancel,     //撤销订单
    ZDOrderStatusOffset = 6,    //超时
    //    ZDOrderStatusDelete,     //删除订单
} ZDOrderStatus;

/**
 司机工作状态
 */
typedef enum : NSUInteger {
    ZDOwnerStatusRush = 1,       //待抢单 1
    ZDOwnerStatusRushSuccess,//抢单成功 2
    ZDOwnerStatusGP,         //订单改派中 3
    ZDOwnerStatusDZ,         //到站 4
    ZDOwnerStatusCancel,     //取消订单 5
    ZDOwnerStatusServiceLog, //+服务记录 6
    ZDOwnerStatusWaitSign,   //待签收 7
    ZDOwnerStatusWaitWind,   //待结算 8
    ZDOwnerStatusEnded,      //已完成 9
    ZDOwnerStatusCommented,  //已评价 10
    ZDOwnerStatusCancel1,   //取消订单 11
    ZDOwnerStatusCancel2,   //取消订单(被处罚24小时内不允许抢单) 12
    ZDOwnerStatusRepeal,     //订单已撤销(获得赔偿金) 13
    ZDOwnerStatusClose,      //订单关闭 14
    ZDOwnerStatusUnEnd,      //未完成(全部结算未勾选) 15
    ZDOwnerStatusGPSuccess,  //改派成功 16
} ZDOwnerStatus;
@interface ZDOrder : BMBaseModel
/**
 *  返回的订单列表
 */
@property (nonatomic, copy) NSString *orderNum;

/**
 *  用车时间
 */
@property (nonatomic, copy) NSString *appointmentTime;

/**
 *  需求方量
 */
@property (nonatomic, assign) double volume;

/**
 *  预估金额
 */
@property (nonatomic, assign) double sumPrice;

@property (nonatomic, assign) double realSumPrice;

/**
 *  需求车辆数
 */
@property (nonatomic, assign) NSInteger count;

/**
 *  订单状态码
 */
@property (nonatomic, assign) ZDOrderStatus status;

@property (nonatomic, copy) NSString *style1;

/**
 *  已抢单人数
 */
@property (nonatomic, assign) NSInteger robCount;

/**
 *  订单创建时间
 */
@property (nonatomic, copy) NSString *createDate;

/**
 *  创建订单的调度员id
 */
@property (nonatomic, assign) NSInteger dispatcherId;

@property (nonatomic, copy) NSString *conditionName;

@property (nonatomic, copy) NSString *condition;

#pragma mark - 创建订单所用;
@property (nonatomic, strong) StylePrice *style;
@property (nonatomic, copy) NSString *changeUnitPrice;
@property (nonatomic, copy) NSString *remarks;



@property (nonatomic, copy) NSString *disPhone;

@property (nonatomic, copy) NSString *stationName;

@property (nonatomic, strong) NSArray *orderLogs;

@property (nonatomic, copy) NSString *revokeTime;

@property (nonatomic, assign) double latitude;

@property (nonatomic, assign) double longitude;

@property (nonatomic, copy) NSString *distance;

@property (nonatomic, assign) CGFloat unitPrice;

@property (nonatomic, copy) NSString *disName;

@property (nonatomic, copy) NSString *stationId;

@property (nonatomic, copy) NSString *price;

@property (nonatomic, assign) NSInteger sumDamage;

@property (nonatomic, assign) NSInteger priceId;

@property (nonatomic, strong) UIColor *orderColor;

@property (nonatomic, copy) NSString *orderTitle;

@property(nonatomic, assign) double totalRealSumPrice;

@end


@interface OrderLog : BMBaseModel

@property (nonatomic, assign) NSInteger ownerId;

@property (nonatomic, strong) NSArray *serviceLogs;

@property (nonatomic, copy) NSString *operateDate;

@property (nonatomic, copy) NSString *driver;

@property (nonatomic, assign) NSInteger averageScore;

@property (nonatomic, copy) NSString *otherReason;

@property (nonatomic, copy) NSString *licensePlateNum;

@property (nonatomic, copy) NSString *reasonId;

@property (nonatomic, copy) NSString *reason;

@property (nonatomic, copy) NSString *licensePlate;

@property (nonatomic, copy) NSString *icon;

@property (nonatomic, copy) NSString *changeOwnerId;

@property (nonatomic, assign) ZDOwnerStatus statusId;

@property (nonatomic, assign) NSInteger truckId;

@property (nonatomic, copy) NSString *addStatus;

@property (nonatomic, assign) double damage;

@property (nonatomic, copy) NSString *phone;

@property (nonatomic, copy) NSString *style1;

@property (nonatomic, copy) NSString *styleName;

@property (nonatomic, assign) NSInteger orderId;

@property (nonatomic, copy) NSString *ownerName;

- (NSString *)getMsg;

+ (UIColor *)getStatusColor:(NSInteger)statusID;

+ (NSString *)getStatusMsg:(ZDOwnerStatus)statusID;


@end


@interface ServiceLog : BMBaseModel

@property (nonatomic, assign) double volume;

@property (nonatomic, copy) NSString *settlementTime;

@property (nonatomic, assign) double realsumPrice;

@property (nonatomic, copy) NSString *signTime;

@property (nonatomic, strong) NSArray *typeCharges;

@property (nonatomic, assign) NSInteger ownerId;

@property (nonatomic, assign) NSInteger orderId;

@property (nonatomic, copy) NSString *distance;

@property (nonatomic, copy) NSString *remarks;

@property (nonatomic, copy) NSString *startTime;

//0:未签收 1:已签收(待结算)2:已签收(已结算)
@property (nonatomic, assign) NSInteger status;

@property (nonatomic, assign) BOOL agreeSignAll;

#pragma mark - 我的收入
@property (nonatomic, assign) double countMoney;

@property (nonatomic, assign) double countMonthMoney;

@end

#pragma mark - feeds
@interface TypeCharge : BMBaseModel

@property (nonatomic, assign) double charge;

@property (nonatomic, assign) NSInteger typeId;

@property (nonatomic, assign) NSInteger serviceLogId;

@property (nonatomic, copy) NSString *typeName;

@end

